
package com.probiz.estore.eai.shippingchoice;

import java.util.List;

import com.probiz.estore.eai.common.GenericUnmarshaller;
import com.probiz.estore.eai.shippingchoice.generated.ShippingChoice;
import com.probiz.estore.eai.shippingchoice.generated.ShippingChoiceSet;
import com.probiz.estore.system.service.ShippingMethodManager;

public class ShippingChoiceUnmarshaller extends
		GenericUnmarshaller<ShippingChoiceSet> {
	ShippingMethodManager  shippingMethodManager=null;
	

	public void setShippingMethodManager(ShippingMethodManager shippingMethodManager) {
		this.shippingMethodManager = shippingMethodManager;
	}


	public void startUnmarshal() throws Exception {
		ShippingChoiceSet shippingChoiceSet = this.getEntitySet();
		List<ShippingChoice> shippingChoiceList=shippingChoiceSet.getShippingchoice();
		logger.debug("shippingChoiceList size="+shippingChoiceList.size());
		shippingMethodManager.doImportShippingMethodsForEai(shippingChoiceList);
	}


}
